New functions to set and use context of window points (bug#33871)
authorJuri Linkov <juri@linkov.net>
Tue, 2 Apr 2024 17:17:41 +0000 (20:17 +0300)
committerJuri Linkov <juri@linkov.net>
Tue, 2 Apr 2024 17:19:21 +0000 (20:19 +0300)
commitc3781bf59edcd67769d068b5bc8f724e890d8e54
treeaee8de9af7e98e433d2ba873c3467f42a108729a
parent617debf67392946b4b42fdf364c69da6f094a840
New functions to set and use context of window points (bug#33871)

* lisp/dired.el (dired-mode): Set buffer-local
'window-point-context-set-function' to remember 'dired-filename'
or 'position' in the window with the Dired buffer.
Set buffer-local 'window-point-context-use-function' to restore
the remembered position of the window point.

* lisp/tab-bar.el (tab-bar--tab): Use window-point-context-set.
(tab-bar-select-restore-context): New user option.
(tab-bar-select-tab): Use window-point-context-use.

* lisp/window.el: Add '(context . writable)' to
'window-persistent-parameters'.
(window-point-context-set, window-point-context-use): New functions.
(window-point-context-set-default-function)
(window-point-context-use-default-function): New functions.
(window-point-context-set-function)
(window-point-context-use-function): New variables.
etc/NEWS
lisp/dired.el
lisp/tab-bar.el
lisp/window.el